'use strict'
const fs = require('fs')
class elifeapp{

    constructor (mdb) {
        this.db = mdb
    }

    async get(){

        let sql =  'select * from app'
        let r = await this.db.query(sql);
        let data = r.rows;
        return data.map((item)=>{
            return{
                appname:item.appname,
                image:`http://211.159.166.29:1234/static/image/ico/${item.image}` 
            }
        })
    }
}

module.exports = elifeapp